package travlefate.story.fragment;

import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import travlefate.story.R;
import travlefate.story.adapter.MyStoryAdapter;
import travlefate.story.base.BaseFragment;
import travlefate.story.views.PullToRefreshRecycleView;

/**
 * @author keven
 * @data 15/12/23 下午2:13
 * @package travlefate.story.fragment
 * 历史
 */

public class FragmentMyStory extends BaseFragment{

    private PullToRefreshRecycleView mRecycleView;
    private MyStoryAdapter mAdapter;


    @Override
    protected void initDatas() {

        LinearLayoutManager manager = new LinearLayoutManager(getActivity());

        mRecycleView.setLayoutManager(manager);

        mAdapter = new MyStoryAdapter(getActivity());

        mRecycleView.setAdapter(mAdapter);
    }

    @Override
    protected void initClick() {

    }

    @Override
    protected void initViews(View view) {
        mRecycleView = (PullToRefreshRecycleView) view.findViewById(R.id.mystory_list);
    }

    @Override
    protected View initLayout(ViewGroup container) {
        return LayoutInflater.from(container.getContext()).inflate(R.layout.fragment_mystory,null);
    }
}
